package com.wzl.common.errcode;


/**
 * 错误码严格按照规划的编码
 *
 * @author wzl
 * @since 2022-08-27 15:40
 */
public enum VkErrorCodeEnum implements VkErrorCode {
    /**
     * 错误码枚举值
     */
    SUCCESS("200", "处理成功"),
    FAILED("400","缺少必要的参数"),
    ERROR("500","不知名错误"),
    ERROR_NULL("501","空指针异常"),
    ERROR_CLASS_CAST("502","类型转换异常"),
    ERROR_RUNTION("503","运行时异常"),
    ERROR_IO("504","上传文件异常"),
    ERROR_MOTHOD_NOT_SUPPORT("505","请求方法错误"),
    ERROR_ARRAY_INDEX_OUT_OF_BOUNDS("506","索引越界异常"),

    UNKNOWN_ERROR("90000001", "程序运行未知异常"),
    MESSAGE_SEND_ERROR("90000002", "消息队列发送异常"),
    MESSAGE_CONS_ERROR("90000003", "消息队列消费异常"),

    QURRY_MESSAGE_ERROR("90000004", "查询信息异常"),
    ;



    /**
     * 状态码
     */
    private final String code;

    /**
     * 提示信息
     */
    private final String message;

    /**
     * 构造函数
     *
     * @param code    状态码
     * @param message 提示信息
     */
    VkErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 获取状态码
     *
     * @return 状态码
     */
    @Override
    public String getCode() {
        return this.code;
    }

    /**
     * 获取提示信息
     *
     * @return 提示信息
     */
    @Override
    public String getMessage() {
        return this.message;
    }
}
